﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;
using NerdDinner.Data.Entities;

namespace NerdDinner.Data.Mappings
{
    public class WalkCategoryMap : ClassMap<WalkCategory>
    {
        public WalkCategoryMap()
        {
            Id(x => x.CategoryId);
            Map(x => x.CategoryName).Not.Nullable();
            Map(x => x.CategoryDesc);
            HasMany(x => x.Walks)
               .Cascade.All()
               .Inverse();
        }
    }
}
